<template>
    <div>
        <h1>A组件,{{ count.num }}</h1>
        <n-button type="primary" size="medium" @click="handelPlus">数字加</n-button>
        <div v-for="item in star.list">
            {{ item.name }} {{ item.age }}
        </div>
        <n-button type="info" size="medium" @click="handelStarPost">明星录入</n-button>
        <div v-for="(item,index) in goods.goodsList" :key="index">
            商品名称：{{ item.name }} 商品价格：{{ item.price }}
        </div>
    </div>
</template>

<script setup>
import { useCount } from '../../store/count';
import { useGoods } from '../../store/goods';
import { useStar } from '../../store/star';
const count = useCount();
const handelPlus = () => {
    count.num++;
}
const star = useStar();

const handelStarPost = () => {
    star.starPost({name:"杨敏",age:21})
}
const goods = useGoods();
</script>

<style lang="scss" scoped>

</style>